<!DOCTYPE html>
<html lang="en">
<meta charset="UTF-8">
<head>js监听span内容的改变</head>



<style>

</style>

<script src="resource/js/jquery-1.11.1.js"> </script>

<script type="text/javascript">

    function testC() {
        var thisV = $("#t").val();
        //console.log(thisV)
        $("[class=test]").text(thisV);
        //console.log()
    }

    $(function () {
        $(".test").bind("DOMNodeInserted",function () {
            console.log("1231")
        });
    });

</script>




<body>

<input id="t" onchange="testC()" />
<hr/>

<span  id="jssj">
    <span class="test">init</span>
</span>




  
</body>



</html>